package en.edu.cuit.aumalls.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import cn.edu.cuit.aumalls.entity.OrderDetailInfo;
import cn.edu.cuit.aumalls.entity.Orders;

public interface FindOrderMapper {

	@Select("select * from orders o  right OUTER JOIN  order_status s on o.order_status ="
			+ " s.order_status_id  where o.order_user = #{orderUser}")
	public List<Orders> findOrderByUser(@Param("orderUser")int orderUser);
	
	@Select("\r\n" + 
			"select * from order_detail od left JOIN goods g on od.detail_goods ="
			+ " g.goods_id where od.detail_order = #{detailOrder}")
	public List<OrderDetailInfo> findOrderGoodsByID(@Param("detailOrder") String detailOrder );

	@Select("\r\n" + 
			"select * from order_detail od left JOIN goods g on od.detail_goods ="
			+ " g.goods_id")
	public List<OrderDetailInfo> findOrderAllGoods();
}
